@()(implicit request: RequestHeader)
@admin.main("代谢物库管理")("metaboDbManage") {
	<div class="page-content">

		<div class="page-bar">
			<ul class="page-breadcrumb">
				<li>
					<i class="fa fa fa-database"></i>
					<a href="">代谢物库管理</a>
				</li>
			</ul>
		</div>


		<div class="row-fluid">
			<div class="row">
				<div class="col-md-12 col-sm-12">
					<div class="portlet blue-madison box">
						<div class="portlet-title">
							<div class="caption">
								代谢物库管理
							</div>
						</div>

						<div class="portlet-body">
							<div class="table-responsive">

								<div id="toolbar">
									<button type="button" class="btn btn-primary" id="deleteButton" onclick="MetaboDbManage.addShow">
										<i class="fa fa-file"></i>&nbsp;更新数据
									</button>
								</div>

								<table class="display table table-bordered" id="table" data-pagination="true" data-search="true"
								data-toolbar="#toolbar" data-page-list="[10, 25, 50, 100, all]" data-multiple-search="true">
									<thead>
										<tr>
										</tr>
									</thead>
								</table>

								<div id="addModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-dialog" style="width: 800px">
										<div class="modal-content">
											<div class="modal-header bg-primary">
												<button type="button" class="close" data-dismiss="modal" aria-hidden="true"
												></button>
												<h4 class="modal-title">
													<i class="fa fa-file"></i>
													<span id="lblAddTitle" style="font-weight: bold">更新数据</span>
												</h4>
											</div>
											<form class="form-horizontal" id="form" action="" data-toggle="validator" enctype="multipart/form-data">
												<div class="modal-body">
													<div class="row-fluid">

														<div class="form-group">
															<label class="control-label col-sm-2">选择文件:</label>
															<div class="col-sm-9">
																<input id="input-1" type="file" class="file" name="file"
																accept=".xlsx"
																>
																<span class="help-block"><a href="@routes.ToolController.downloadExampleData()?fileName=metabolite_db.xlsx"><em>
																	示例数据</em></a></span>
															</div>
														</div>

														<div class="form-group">
															<div class="actions col-sm-offset-2 col-sm-8">
																<p>

																	<b>注：</b>上传的文件会覆盖全部数据！<br>
																</p>
															</div>

														</div>

													</div>
												</div>
												<div class="modal-footer bg-info">
													<button type="button" class="btn blue" onclick="MetaboDbManage.updateDb">
														确定</button>
													<button type="button" class="btn green" data-dismiss="modal" >
														取消</button>
												</div>
											</form>
										</div>
									</div>
								</div>

							</div>
						</div>
					</div>
				</div>
			</div>


		</div>

	</div>


	<script>

			$(".file").fileinput({
				showPreview: false,
				showUpload: false,
				browseLabel: "选择...",
				removeLabel: "删除文件",
				language: "zh",
			});

			$(function () {
				MetaboDbManage.init


			})

	</script>


}